package week13;

public class ExceptionExample {
    public static void main(String[] args) {
        try {
            int data = 50 / 0;
            System.out.println("data=" + data);
        }catch (Exception e){
            e.printStackTrace();
        }finally{
            System.out.println("一定会执行到的");
        }
        try {
            int[]arr={1,2,4};
            for (int i = 0; i <arr.length ; i++) {
                System.out.println(arr[i]);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
